﻿@namespace BootstrapBlazor.Components
@typeparam TValue
@inherits Checkbox<TValue>

<div @attributes="AdditionalAttributes" class="@GetClassString(IsButton)" aria-checked="@StateString">
    @if (!IsButton)
    {
        <input class="@InputClassString" type="radio" name="@GroupName" id="@Id" disabled="@Disabled" checked="@CheckedString" @onclick="@OnClickHandler">
        @if (ShowAfterLabel && !string.IsNullOrEmpty(DisplayText))
        {
            <label class="form-check-label" for="@Id">@DisplayText</label>
        }
    }
    else
    {
        <DynamicElement TagName="span" TriggerClick="!IsDisabled" OnClick="OnClickHandler">
            @DisplayText
        </DynamicElement>
    }
</div>
